{
  "properties" : { },
  "id" : "copy1739538732579d92549",
  "script" : null,
  "groupId" : "b3703296495946aabf6a72b7d085c5d6",
  "name" : "移动文件",
  "createTime" : null,
  "updateTime" : 1739540106144,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "可辉",
  "path" : "move_file",
  "method" : "GET",
  "parameters" : [ {
    "name" : "search",
    "value" : "网络下载\\\\",
    "description" : null,
    "required" : true,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"success\",\n    \"data\": 1\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.File;
import log;

var datalist = db.table('file_videos').where().like('path','%'+search+'%').and().notLike('path','%\_%').select();
for (item in datalist) {
    var nextUrl = new File(item.path).getParent() +"_"+ item.name;
    var nextName = new File(new File(item.path).getParent()).getName() +"_"+ item.name;
    // cmd 移动
    String cmd = "cmd /c move \""+item.path+"\"" + " \""+nextUrl+"\"";
    Process process = Runtime.getRuntime().exec(cmd);
    BufferedReader stdInput = new BufferedReader(new InputStreamReader(process.getInputStream()));
    process.waitFor();
    // data 修正
    item.path = nextUrl;
    item.name = nextName;
    db.table('file_videos').where().eq('id', item.id).update(item)
}

return 1